<?php

require '../connect.php'; 

$id=  isset($_GET['id'])?$_GET['id']:0;

$sql="DELETE FROM tb_ad WHERE e_id=$id";

$result=$dd->query($sql);

if($result)
{
    echo "<script language='javascript'type='text/javascript'>";
    echo   " alert('删除成功');";
    echo   " window.location.href='show.php';";
    echo    "</script>";
}
else
{
    echo "<script language='javascript'type='text/javascript'>";
    echo   " alert('删除失败');";
    echo   " window.location.href='show.php';";
    echo    "</script>";
}